/*
 * Project: BoboDesignPattern
 * 
 * File Created at 2019年12月30日
 * 
 * Copyright 2012 Greenline.com Corporation Limited.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * Greenline Company. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Greenline.com.
 */
package test.practice;

import sigleton.TestInstance;

/**
 * @Type A20191230__singleton
 * @Desc
 * @author 52489
 * @date 2019年12月30日
 * @Version V1.0
 */
public class A20191230__singleton_hungry {
    private int num = 0;

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    private static A20191230__singleton_hungry INSTANCE = new A20191230__singleton_hungry();

    private A20191230__singleton_hungry() {

    }

    private static A20191230__singleton_hungry instance() {
        return INSTANCE;
    }

    public static void main(String[] args) {
        A20191230__singleton_hungry singleton_hungry = A20191230__singleton_hungry.instance();
        singleton_hungry.setNum(5);
        A20191230__singleton_hungry singleton_hungry2 = A20191230__singleton_hungry.instance();
        System.out.println(singleton_hungry2.getNum());
        TestInstance s1 = A20191230__singleton_enum.INSTANCE.getInstance();
        s1.setNumber(4);
        TestInstance s2 = A20191230__singleton_enum.INSTANCE.getInstance();
        System.out.println(s2.getNumber());
    }

}
